package com.swbyte.utils.kotlin

import android.support.annotation.DrawableRes
import android.support.v4.content.ContextCompat
import android.widget.ImageView
import com.chaodriod.common.utils.Utils

/**
 * Created by CHEN on 2018/4/18.
 */
fun ImageView.setDrawable(@DrawableRes id: Int) {
    this.setImageDrawable(ContextCompat.getDrawable(Utils.getContext(), id))
}